$.ajax({
    type:"post",
    url:"/OutBoundManage/getDelivaeryDetail",
    data:{},
    dataType:"json",
    success:function(r){
        console.log(r);
        var t="<li>\n" +
            "      <label>订单编号</label>\n" +
            "      <cite>"+r.orderid+"</cite>\n" +
            "    </li>\n" +
            "    <li>\n" +
            "      <label>客户姓名</label>\n" +
            "      <cite><a href=\"../../market/customer/customerView.html\" title=\"点击查看客户详细信息\" onclick='toCustomer(this)'>"+r.cunstomname+"</a></cite>\n" +
            "    </li>\n" +
            "    <li>\n" +
            "      <label>联系电话</label>\n" +
            "      <cite>"+r.tel+"</cite>\n" +
            "    </li>\n" +
            "    <li>\n" +
            "      <label>订购时间</label>\n" +
            "      <cite>"+r.ordertime+"</cite>\n" +
            "    </li>\n" +
            "    <li>\n" +
            "      <label>总金额</label>\n" +
            "       <cite>"+r.totalprice+"</cite>\n" +
            "    </li>\n" +
            "    <li>\n" +
            "      <label>操作人</label>\n" +
            "      <cite>"+r.caozuoman+"</cite>\n" +
            "    </li>\n" +
            "    <li>\n" +
            "      <label>审核状态</label>\n" +
            "      <cite>"+r.shengHeZhuangTai+"</cite>\n" +
            "    </li>\n" +
            "    <li>\n" +
            "      <label>审核意见</label>\n" +
            "      <cite>"+r.checkDetail+"</cite>\n" +
            "    </li>\n" +
            "    <li>\n" +
            "      <label>审核人</label>\n" +
            "      <cite>"+r.shengHeMan+"</cite>\n" +
            "    </li>\n" +
            "    <li>\n" +
            "      <label>审核时间</label>\n" +
            "      <cite>"+r.chectime+"</cite>\n" +
            "    </li>\n" +
            "    <li houseid='"+r.houseid+"'>\n" +
            "      <label>出货仓库</label>\n" +
            "      <cite><a href=\"javascript:void(0)\" onclick='toStorDetial(this)' title=\"点击查看仓库详细信息\" class=\"tablelink\">"+r.housename+"</a></cite>\n" +
            "    </li>\n" +
            "    <li>\n" +
            "      <label>出库时间</label>\n" +
            "      <cite>"+r.outCountTime+"</cite>\n" +
            "    </li>\n" +
            "    <li>\n" +
            "      <label>出库人</label>\n" +
            "      <cite>"+r.outCountman+"</cite>\n" +
            "    </li>\n" +
            "    <li>\n" +
            "      <label>出库状态</label>\n" +
            "      <cite>"+r.outCountZhuangTai+"</cite>\n" +
            "    </li>"
        $(".forminfo").html(t);
    },
    error:function (r) {
        alert("!!!")
    }

})

$.ajax({
    type:"post",
    url:"/OutBoundManage/getCommentDetialByOrderId",
    data:{},
    dataType:"json",
    success:function(r){
        console.log(r);
        var t="";
        for (var i=0;i < r.length;i++) {
            t += "<tr>\n" +
                "          <td>"+(i+1)+"</td>\n" +
                "          <td>" + r[i].firmname + "</td>\n" +
                "          <td>" + r[i].typename + "</td>\n" +
                "          <td>" + r[i].modelname + "</td>\n" +
                "          <td>" + r[i].countNumber + "</td>\n" +
                "          <td>" + r[i].utilname + "</td>\n" +
                "          <td>" + r[i].oneprice + "</td>\n" +
                "          <td>" + r[i].totalprice + "</td>\n" +
                "        </tr>"
        }
        $(".tablelist tbody").html(t);
    },
    error:function (r) {
        alert("!!!")
    }

})

function toStorDetial(n) {
    var houseid = $(n).parent().parent().attr("houseid");
    $.ajax({
        type:"post",
        url:"/StoreManage/toStorageDetial",
        data:{storageid:houseid},
        dataType:"json",
        success:function(r){
            if(r=="false"){
                alert("错!!!");
            }else{
                location.href="/storage/storage/storageView.html";
            }
        },
        error:function (r) {
            alert("!!!")
        }
    })
}

function toCustomer(n) {
    var cunstomname = $(n).html();
    sessionStorage.removeItem("cunstomOneName")
    sessionStorage.setItem("cunstomOneName",JSON.parse(cunstomname));

}